<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.10"/>
<title>My Project: Port Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">My Project
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="class_port-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Port Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
Inheritance diagram for Port:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_port.png" usemap="#Port_map" alt=""/>
  <map id="Port_map" name="Port_map">
<area href="class_port_base.html" alt="PortBase" shape="rect" coords="0,0,63,24"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ac7da4ae14a771d5509e743e98fe0dc05"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_port.html#ac7da4ae14a771d5509e743e98fe0dc05">Port</a> (<a class="el" href="classraft_1_1kernel.html">raft::kernel</a> *k)</td></tr>
<tr class="separator:ac7da4ae14a771d5509e743e98fe0dc05"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a706968dde40372ffd1748d50c258f6b7"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_port.html#a706968dde40372ffd1748d50c258f6b7">Port</a> (<a class="el" href="classraft_1_1kernel.html">raft::kernel</a> *k, void *const ptr, const std::size_t nbytes)</td></tr>
<tr class="separator:a706968dde40372ffd1748d50c258f6b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afe166c2a6b10ad34d47472a150366bc1"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_port.html#afe166c2a6b10ad34d47472a150366bc1">~Port</a> ()</td></tr>
<tr class="separator:afe166c2a6b10ad34d47472a150366bc1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeb1c43cc7563ce977ba0bc7b581d2e75"><td class="memTemplParams" colspan="2">template&lt;class T &gt; </td></tr>
<tr class="memitem:aeb1c43cc7563ce977ba0bc7b581d2e75"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_port.html#aeb1c43cc7563ce977ba0bc7b581d2e75">addPort</a> (const std::string &amp;&amp;port_name)</td></tr>
<tr class="separator:aeb1c43cc7563ce977ba0bc7b581d2e75"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaf89e298b9ae64f9c42703c14d9eed0a"><td class="memTemplParams" colspan="2">template&lt;class T &gt; </td></tr>
<tr class="memitem:aaf89e298b9ae64f9c42703c14d9eed0a"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_port.html#aaf89e298b9ae64f9c42703c14d9eed0a">addInPlacePorts</a> (const std::size_t n_ports)</td></tr>
<tr class="separator:aaf89e298b9ae64f9c42703c14d9eed0a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af34969d8f5e17ad29233334526d5b77b"><td class="memItemLeft" align="right" valign="top">const std::type_index &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_port.html#af34969d8f5e17ad29233334526d5b77b">getPortType</a> (const std::string &amp;&amp;port_name)</td></tr>
<tr class="separator:af34969d8f5e17ad29233334526d5b77b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a08cf165426982d83e5a191ba74cc6e5d"><td class="memItemLeft" align="right" valign="top">virtual FIFO &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_port.html#a08cf165426982d83e5a191ba74cc6e5d">operator[]</a> (const std::string &amp;&amp;port_name)</td></tr>
<tr class="separator:a08cf165426982d83e5a191ba74cc6e5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7042f5b5c2ab14c9591a4984811a6012"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_port.html#a7042f5b5c2ab14c9591a4984811a6012">hasPorts</a> ()</td></tr>
<tr class="separator:a7042f5b5c2ab14c9591a4984811a6012"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf4d86026b67f6c02db3e3abb0f2e8b4"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="class_port_iterator.html">PortIterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_port.html#abf4d86026b67f6c02db3e3abb0f2e8b4">begin</a> ()</td></tr>
<tr class="separator:abf4d86026b67f6c02db3e3abb0f2e8b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa85be3fb7734863d482bf002e0f0923d"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="class_port_iterator.html">PortIterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_port.html#aa85be3fb7734863d482bf002e0f0923d">end</a> ()</td></tr>
<tr class="separator:aa85be3fb7734863d482bf002e0f0923d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a33562ea87ac7e83a32441da40cbd9279"><td class="memItemLeft" align="right" valign="top">std::size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_port.html#a33562ea87ac7e83a32441da40cbd9279">count</a> ()</td></tr>
<tr class="separator:a33562ea87ac7e83a32441da40cbd9279"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a90a9a883b2e10871e7a8dc55ab0077f5"><td class="memTemplParams" colspan="2">template&lt;class T &gt; </td></tr>
<tr class="memitem:a90a9a883b2e10871e7a8dc55ab0077f5"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_port.html#a90a9a883b2e10871e7a8dc55ab0077f5">initializeConstMap</a> (<a class="el" href="struct_port_info.html">PortInfo</a> &amp;pi)</td></tr>
<tr class="separator:a90a9a883b2e10871e7a8dc55ab0077f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7189f6823a0d240396210a7c317d4803"><td class="memTemplParams" colspan="2">template&lt;class T &gt; </td></tr>
<tr class="memitem:a7189f6823a0d240396210a7c317d4803"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_port.html#a7189f6823a0d240396210a7c317d4803">initializeSplit</a> (<a class="el" href="struct_port_info.html">PortInfo</a> &amp;pi)</td></tr>
<tr class="separator:a7189f6823a0d240396210a7c317d4803"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a179c9a36189eb621a5874a0741708e59"><td class="memTemplParams" colspan="2">template&lt;class T &gt; </td></tr>
<tr class="memitem:a179c9a36189eb621a5874a0741708e59"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_port.html#a179c9a36189eb621a5874a0741708e59">initializeJoin</a> (<a class="el" href="struct_port_info.html">PortInfo</a> &amp;pi)</td></tr>
<tr class="separator:a179c9a36189eb621a5874a0741708e59"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4af1cb062940ca3b83c569f024b9a8d1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_port_info.html">PortInfo</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_port.html#a4af1cb062940ca3b83c569f024b9a8d1">getPortInfo</a> ()</td></tr>
<tr class="separator:a4af1cb062940ca3b83c569f024b9a8d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afb426a015195fa9b4b5b1d1200daf8ed"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_port_info.html">PortInfo</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_port.html#afb426a015195fa9b4b5b1d1200daf8ed">getPortInfoFor</a> (const std::string port_name)</td></tr>
<tr class="separator:afb426a015195fa9b4b5b1d1200daf8ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a537a8a0c2a47acbf8654f286200aee90"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structportmap__t.html">portmap_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_port.html#a537a8a0c2a47acbf8654f286200aee90">portmap</a></td></tr>
<tr class="separator:a537a8a0c2a47acbf8654f286200aee90"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac17060db235459adaab87cdccb605884"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classraft_1_1kernel.html">raft::kernel</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_port.html#ac17060db235459adaab87cdccb605884">kernel</a> = nullptr</td></tr>
<tr class="separator:ac17060db235459adaab87cdccb605884"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a78bf16e68f1dd5312f37b4e2806a9cf8"><td class="memItemLeft" align="right" valign="top">void *const&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_port.html#a78bf16e68f1dd5312f37b4e2806a9cf8">alloc_ptr</a> = nullptr</td></tr>
<tr class="separator:a78bf16e68f1dd5312f37b4e2806a9cf8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a98d2e7e0e570e082465c692083300fa9"><td class="memItemLeft" align="right" valign="top">const std::size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_port.html#a98d2e7e0e570e082465c692083300fa9">alloc_ptr_length</a> = 0</td></tr>
<tr class="separator:a98d2e7e0e570e082465c692083300fa9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:aed45534b6a99d5630dcfa9eedbe023fc"><td class="memItemLeft" align="right" valign="top">class&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_port.html#aed45534b6a99d5630dcfa9eedbe023fc">MapBase</a></td></tr>
<tr class="separator:aed45534b6a99d5630dcfa9eedbe023fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad2f32e921244459f7cc6d50355429cc6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad2f32e921244459f7cc6d50355429cc6"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>Map</b></td></tr>
<tr class="separator:ad2f32e921244459f7cc6d50355429cc6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a60770fd1bd2e4378b64b8bb78b3af209"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a60770fd1bd2e4378b64b8bb78b3af209"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>GraphTools</b></td></tr>
<tr class="separator:a60770fd1bd2e4378b64b8bb78b3af209"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a901ac6fe1c35f3c114cf9e83f75dde0c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a901ac6fe1c35f3c114cf9e83f75dde0c"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>basic_parallel</b></td></tr>
<tr class="separator:a901ac6fe1c35f3c114cf9e83f75dde0c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf9ffb5a15eb9623a47ea7e488ae112b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abf9ffb5a15eb9623a47ea7e488ae112b"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>raft::parallel_k</b></td></tr>
<tr class="separator:abf9ffb5a15eb9623a47ea7e488ae112b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ac7da4ae14a771d5509e743e98fe0dc05"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Port::Port </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classraft_1_1kernel.html">raft::kernel</a> *&#160;</td>
          <td class="paramname"><em>k</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><a class="el" href="class_port.html">Port</a> - constructor used to construct a standard port object, needs a reference to the parent kernel for the port_info struct </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">k</td><td>- <a class="el" href="classraft_1_1kernel.html">raft::kernel</a>*</td></tr>
  </table>
  </dd>
</dl>
<p>port.cpp - </p><dl class="section author"><dt>Author</dt><dd>: Jonathan Beard </dd></dl>
<dl class="section version"><dt>Version</dt><dd>: Thu Aug 28 09:55:47 2014</dd></dl>
<p>Copyright 2014 Jonathan Beard</p>
<p>Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at:</p>
<p><a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a></p>
<p>Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. </p>

</div>
</div>
<a class="anchor" id="a706968dde40372ffd1748d50c258f6b7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Port::Port </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classraft_1_1kernel.html">raft::kernel</a> *&#160;</td>
          <td class="paramname"><em>k</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *const&#160;</td>
          <td class="paramname"><em>ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::size_t&#160;</td>
          <td class="paramname"><em>nbytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><a class="el" href="class_port.html">Port</a> - constructor used to construct a port with pre-allocated memory, useful for things like array distribution and reduction </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">k</td><td>- <a class="el" href="classraft_1_1kernel.html">raft::kernel</a>* </td></tr>
    <tr><td class="paramname">ptr</td><td>- void* </td></tr>
    <tr><td class="paramname">nbytes</td><td>- const std::size_t length in bytes </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="afe166c2a6b10ad34d47472a150366bc1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Port::~Port </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>~Port - destructor, deletes the FIFO that was given when the object was initalized. </p>
<p>the port map is allocated on the heap so the port_info destructor is called</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="aaf89e298b9ae64f9c42703c14d9eed0a"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool Port::addInPlacePorts </td>
          <td>(</td>
          <td class="paramtype">const std::size_t&#160;</td>
          <td class="paramname"><em>n_ports</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>addPorts - add ports for an existing buffer, basically allocate buffers in place. These also won't be able to be resized. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">n_ports</td><td>- const std::size_t </td></tr>
  </table>
  </dd>
</dl>
<p>pointer </p>

</div>
</div>
<a class="anchor" id="aeb1c43cc7563ce977ba0bc7b581d2e75"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Port::addPort </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&amp;&#160;</td>
          <td class="paramname"><em>port_name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>addPort - adds and initializes a port for the name given. Function returns true if added, false if not. Main reason for returning false would be that the port already exists. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">port_name</td><td>- const std::string </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>bool </dd></dl>
<p>we'll have to make a port info object first and pass it by copy to the portmap. Perhaps re-work later with pointers, but for right now this will work and it doesn't necessarily have to be performant since its only executed once.</p>

</div>
</div>
<a class="anchor" id="abf4d86026b67f6c02db3e3abb0f2e8b4"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_port_iterator.html">PortIterator</a> Port::begin </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>begin - get the beginning port. </p><dl class="section return"><dt>Returns</dt><dd><a class="el" href="class_port_iterator.html">PortIterator</a> </dd></dl>

<p>Implements <a class="el" href="class_port_base.html#afc54c92e3b9d1967e8a8c7e74d7507d3">PortBase</a>.</p>

</div>
</div>
<a class="anchor" id="a33562ea87ac7e83a32441da40cbd9279"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::size_t Port::count </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>count - get the total number of fifos within this port container </p><dl class="section return"><dt>Returns</dt><dd>std::size_t </dd></dl>

</div>
</div>
<a class="anchor" id="aa85be3fb7734863d482bf002e0f0923d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_port_iterator.html">PortIterator</a> Port::end </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>end - get the end port </p><dl class="section return"><dt>Returns</dt><dd><a class="el" href="class_port_iterator.html">PortIterator</a> </dd></dl>

<p>Implements <a class="el" href="class_port_base.html#a50427e7a1beea0d5111ccc81ee418178">PortBase</a>.</p>

</div>
</div>
<a class="anchor" id="a4af1cb062940ca3b83c569f024b9a8d1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct_port_info.html">PortInfo</a> &amp; Port::getPortInfo </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>getPortInfo - returns the <a class="el" href="struct_port_info.html">PortInfo</a> struct for a kernel if we expect it to have a single port. If there's more than one port this function throws an exception. </p><dl class="section return"><dt>Returns</dt><dd>std::pair&lt; std::string, PortInfo&amp; &gt; </dd></dl>
<p>TODO: extract kernel name to go here too </p>

</div>
</div>
<a class="anchor" id="afb426a015195fa9b4b5b1d1200daf8ed"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct_port_info.html">PortInfo</a> &amp; Port::getPortInfoFor </td>
          <td>(</td>
          <td class="paramtype">const std::string&#160;</td>
          <td class="paramname"><em>port_name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>getPortInfoFor - gets port information for the param port throws an exception if the port doesn't exist. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">port_name</td><td>- const std::string </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="struct_port_info.html">PortInfo</a>&amp; </dd></dl>

</div>
</div>
<a class="anchor" id="af34969d8f5e17ad29233334526d5b77b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const std::type_index &amp; Port::getPortType </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&amp;&#160;</td>
          <td class="paramname"><em>port_name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>getPortType - input the port name, and get the hash for the type of the port. This function is useful for checking the streaming graph to make sure all the ports that are "dynamically" created do in fact have compatible types. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">port_name</td><td>- const std::string </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>const type_index&amp; </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="el" href="class_port_not_found_exception.html">PortNotFoundException</a></td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a7042f5b5c2ab14c9591a4984811a6012"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool Port::hasPorts </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>hasPorts - returns true if any ports exists, false otherwise. </p><dl class="section return"><dt>Returns</dt><dd>bool </dd></dl>

<p>Implements <a class="el" href="class_port_base.html#a29870b5e201f46a806d2269d7f4635dc">PortBase</a>.</p>

</div>
</div>
<a class="anchor" id="a90a9a883b2e10871e7a8dc55ab0077f5"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Port::initializeConstMap </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_port_info.html">PortInfo</a> &amp;&#160;</td>
          <td class="paramname"><em>pi</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>initializeConstMap - hack to get around the inability to otherwise initialize a template function where later we don't have the template parameter. NOTE: this is a biggy, if we have more FIFO types in the future (i.e., sub-classes of FIFO) then we must create an entry here otherwise bad things will happen. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pi</td><td>- <a class="el" href="struct_port_info.html">PortInfo</a>&amp; </td></tr>
  </table>
  </dd>
</dl>
<p>no instrumentation</p>
<p>yes instrumentation</p>
<p>no instrumentation</p>
<p>NOTE: If you define more port resource types, they have to be defined here...otherwise the allocator won't be able to allocate the correct type, size, etc. for the port..and well, it'll be sad.</p>

</div>
</div>
<a class="anchor" id="a179c9a36189eb621a5874a0741708e59"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Port::initializeJoin </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_port_info.html">PortInfo</a> &amp;&#160;</td>
          <td class="paramname"><em>pi</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>initializeJoin - pre-allocate join kernels...saves allocation time later, takes up minimal space and all that is needed when these are actually used is to allocate memory for the ports which is done by the </p>

</div>
</div>
<a class="anchor" id="a7189f6823a0d240396210a7c317d4803"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Port::initializeSplit </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_port_info.html">PortInfo</a> &amp;&#160;</td>
          <td class="paramname"><em>pi</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>initializeSplit - pre-allocate split kernels...saves allocation time later, then all that is needed is to hook them up, and allocate memory for the ports. </p>

</div>
</div>
<a class="anchor" id="a08cf165426982d83e5a191ba74cc6e5d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">FIFO &amp; Port::operator[] </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&amp;&#160;</td>
          <td class="paramname"><em>port_name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>operator[] - input the port name and get a port if it exists. </p>

<p>Implements <a class="el" href="class_port_base.html#ad034502b053f3cd7939d651b2d72cd0a">PortBase</a>.</p>

</div>
</div>
<h2 class="groupheader">Friends And Related Function Documentation</h2>
<a class="anchor" id="aed45534b6a99d5630dcfa9eedbe023fc"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">friend class <a class="el" href="class_map_base.html">MapBase</a></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>we need some friends </p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a78bf16e68f1dd5312f37b4e2806a9cf8"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void* const Port::alloc_ptr = nullptr</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>ptr used for in-place allocations, will not be deleted by the map, also should not be modified by the map either. </p>

</div>
</div>
<a class="anchor" id="a98d2e7e0e570e082465c692083300fa9"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const std::size_t Port::alloc_ptr_length = 0</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>alloc_ptr_length - length of alloc_ptr in bytes. </p>

</div>
</div>
<a class="anchor" id="ac17060db235459adaab87cdccb605884"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classraft_1_1kernel.html">raft::kernel</a>* Port::kernel = nullptr</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>parent kernel that owns this port </p>

</div>
</div>
<a class="anchor" id="a537a8a0c2a47acbf8654f286200aee90"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structportmap__t.html">portmap_t</a> Port::portmap</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>portmap - container struct with all ports. The mutex should be locked before accessing this structure </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="port_8hpp_source.html">port.hpp</a></li>
<li>port.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.10
</small></address>
</body>
</html>
